package com.example.demo.entity.vo;

import com.example.demo.exception.CmsException;
import com.example.demo.exception.ErrorCode;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author chen huilong
 * @data 2022/10/7
 */
@Data
public class GroupInput {

    @ApiModelProperty(value = "学号", required = true)
    private String userNumber;

    @ApiModelProperty(value = "验证码", required = true)
    private String verificationCode;

    public void checkParam() {
        if (this.userNumber == null) {
            throw new CmsException(ErrorCode.USER_NUMBER_IS_NULL);
        }
        if (this.verificationCode == null) {
            throw new CmsException(ErrorCode.VERIFICATION_CODE_IS_NULL);
        }
    }
}
